package com.memo4android.ui;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

import com.memo4android.ToDoActivity;
import com.memo4android.model.ItemTodoList;

public class TodoListClickedListener implements OnClickListener {

	private ItemTodoList Tdl;
	private Context context;
	private Activity activity;
	
	public TodoListClickedListener(Context context, ItemTodoList Itdl){
		this.Tdl = Itdl;
		this.context = context;
		this.activity = (Activity) context;
	}
	
	public void onClick(View v) {
		Intent intent = new Intent(context, ToDoActivity.class);
		intent.putExtra("PrioriteName", Tdl.getPriorite());
		intent.putExtra("TodoName", Tdl.getTitre());
		activity.startActivity(intent);
	}
}
